package homeWork;

public class Person {
    String idNumber;
    String name;
    Person(String id, String name) {
        this.idNumber = id;
        this.name = name;
    }
    public void compareTo (Person o1, Person o2) {
        if(o1.idNumber==o2.idNumber){
            System.out.println("两个对象是相等的");
        }else{
            System.out.println("两个对象不是相等的");
        }
    }
}
